import request from '@/utils/request'

// 新品推荐列表
export const fetchNewProductList = (params) => {
    return request({
        url: '/home/newProduct/list',
        method: 'get',
        params: params
    })
}

// 更新新品推荐状态
export const updateNewProductStatus = (data) => {
    return request({
        url: '/home/newProduct/update/recommendStatus',
        method: 'post',
        data: data
    })
}

// 删除新品推荐
export const deleteNewProduct = (data) => {
    return request({
        url: '/home/newProduct/delete',
        method: 'post',
        data: data
    })
}

// 创建新品推荐
export const createNewProduct = (data) => {
    return request({
        url: '/home/newProduct/create',
        method: 'post',
        data: data
    })
}

// 更新新品推荐排序
export const updateHotProductSort = (params) => {
    return request({
        url: '/home/newProduct/update/sort/' + params.id,
        method: 'post',
        params: params
    })
}